//package hotciv.view.tool;
//
//import java.awt.Point;
//import java.awt.event.MouseEvent;
//
//import hotciv.framework.*;
//import hotciv.view.GfxConstants;
//import minidraw.framework.DrawingEditor;
//import minidraw.standard.NullTool;
//
///**
// * @author John
// *
// */
///**
// * @author John
// *
// */
//public class CityFocusTool extends NullTool 
//{
//	private Game game;
//	private DrawingEditor editor;
//	private InspectTool InspectTool;
//	private Position cityPos;
//	private City city;
//	private int cityX, cityY;
//
//	public CityFocusTool(DrawingEditor editor, Game game, InspectTool focus) 
//	{
//		this.editor = editor;
//		this.game = game;
//		
//		InspectTool = focus;
//		city = null;
//		cityPos = null;
//		cityX = 0;
//		cityY = 0;
//	}
//
//	private boolean amIpointingOnProduction(int x, int y) 
//	{
//		Point production = new Point(GfxConstants.CITY_PRODUCTION_X, GfxConstants.CITY_PRODUCTION_Y);
//		Point p = new Point(x, y);
//		
//		if (p.distance(production) < 44)  
//			return true;
//		return false;
//	}
//
//	private boolean amIpointingOnWorkFocus(int x, int y) 
//	{
//		Point workFocus = new Point(GfxConstants.WORKFORCEFOCUS_X, GfxConstants.WORKFORCEFOCUS_Y);
//		Point p = new Point(x, y);
//		
//		if (p.distance(workFocus) < 49)
//			return true;
//		return false;
//	}
//	
//	
//	
//	public void mouseDown(MouseEvent e, int x, int y) 
//	{
//		Position p = GfxConstants.getPositionFromXY(x, y);
//		
//		if ((amIpointingOnProduction(x, y)) == false || (amIpointingOnWorkFocus(x, y)) == false && game.getCityAt(p) != null) 
//		{
//			cityX = x; 
//			cityY = y;
//			
//			cityPos = GfxConstants.getPositionFromXY(x, y);
//			city = game.getCityAt(cityPos);
//		}
//		if (city != null && city.getOwner() == game.getPlayerInTurn() && amIpointingOnProduction(x, y) == true)
//		{
//			if (city.getProduction() == GameConstants.ARCHER) 
//			{
//			
//				game.changeProductionInCityAt(cityPos, GameConstants.LEGION);
//				InspectTool.mouseUp(e, cityX, cityY);
//				editor.showStatus(city.getOwner() + " has changed to Legion-production");
//
//			} 
//			else if (city.getProduction() == GameConstants.LEGION) 
//			{
//			
//				game.changeProductionInCityAt(cityPos, GameConstants.SETTLER);
//				InspectTool.mouseUp(e, cityX, cityY);
//				editor.showStatus(city.getOwner() + " has change to Settler-production");
//
//			} 
//			else if (city.getProduction() == GameConstants.SETTLER) 
//			{
//			
//				game.changeProductionInCityAt(cityPos, GameConstants.ARCHER);
//				InspectTool.mouseUp(e, cityX, cityY);
//				editor.showStatus(city.getOwner() + " has change to Archer-production");
//
//			}
//		} 
//		else if (city != null && city.getOwner() == game.getPlayerInTurn() && amIpointingOnWorkFocus(x, y) == true) 
//		{
//			if (city.getWorkforceFocus() == GameConstants.productionFocus) 
//	
//			}
//		}
//	}
//
//
//}